13. Exercise: Reading from SharedPreferences

Exercise Code

In this exercise, you will get to read values from SharedPreferences.

Exercise: T06.03-Exercise-ReadingFromSharedPreferences

Reading from SharedPreferences

Now it's your turn to read the value of the CheckBox from them SharedPreference and update the UI view based on that value.

SOLUTION:
  • Using PreferenceManager, get the default SharedPreference
  • Set setShowBass in mVisualizerView based on the value from the SharedPreference